# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-printer
pkgver=0.9.20
pkgrel=1
pkgdesc='Printer configuration project for DDE'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-printer"
license=('GPL3')
# smbclient: dlopen
depends=('cups' 'dtkcore' 'dtkgui' 'dtkwidget' 'glibc' 'gcc-libs' 'libusb' 'qt5-base'
         'hicolor-icon-theme' 'xdg-utils' 'smbclient')
makedepends=('qt5-tools')
groups=('deepin-extra')
source=("https://github.com/linuxdeepin/dde-printer/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('5897e4eed212548cadcb8808a5d0e434866b19d9b1be438595d2cd0ce4628e64779356918072c4eddbcc06ff3724bfc9d44e3edfd5159e6b49e4a138bffa93fd')

prepare() {
  cd dde-printer-$pkgver
  sed -i '$aOnlyShowIn=Deepin' src/Printer/platform/linux/dde-printer.desktop
}

build() {
  cd dde-printer-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd dde-printer-$pkgver
  make INSTALL_ROOT="$pkgdir" install
}
